package com.JFapp.mapper;

import com.JFapp.domain.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * 计服角色表(Role)表数据库访问层
 *
 * @author makejava
 * @since 2023-12-06 20:50:49
 */
public interface RoleMapper extends BaseMapper<Role> {

    void insertRole(@Param("list") List<Long> uid,@Param("rid") Long rid);


    List<String> selectRoleKeysById(Long id);

    void empower(@Param("empowers") Map<Long, Long> empowers);

    void deleteRoleAndMenu(Long id);

    void insertRoleAndMenu(@Param("menuIds") List<Long> menuIds,@Param("rid") Long rid);

    Long selectRoleByUid(Long userId);

    void deleteRoleAndUser(@Param("userIds") List<Long> userId);

    List<Long> selectRoleIdByUserId(Long userId);


    void deleteRoleAndUser1(Long id);

    void insertRoleAndUser(@Param("id") Long id,@Param("roleIds") List<Long> roleIds);
}
